<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
    <input class="form-control" name="row[is_chat]" type="hidden" value="0">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('课程编码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" data-rule="required" class="form-control" name="row[number]" type="text" value="" maxlength="6"><span>课程编码为6位</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('主讲老师')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-teacher_id" data-rule="required" data-source="learn/teacher/index" class="form-control selectpage" name="row[teacher_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Introduce')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-introduce" class="form-control " rows="5" name="row[introduce]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('上传课程')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file" data-rule="required"  class="form-control" size="5120" name="row[file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-vediofile" class="btn btn-danger plupload" data-input-id="c-file" data-mimetype="mp4,avi,flv,wmv,mp3" data-multiple="false" data-maxsize="5120M" data-multipart={"controller":"{$controller}.movie"}><i class="fa fa-upload" data-preview-id="p-file"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-vediofile" class="btn btn-primary fachoose" data-input-id="c-file" data-mimetype="mp4,avi,flv,wmv,mp3" data-multiple="false" data-multipart="{$controller}.movie"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file"></span>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Origin_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-origin_price" data-rule="required" class="form-control" step="0.01" name="row[origin_price]" type="number" value="0.00" onmousewheel="return false;" onDOMMouseScroll="stopScrollFun">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="0.00" onmousewheel="return false;" onDOMMouseScroll="stopScrollFun">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Visitor_origin_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-visitor_origin_price" data-rule="required" class="form-control" step="0.01" name="row[visitor_origin_price]" type="number" value="0.00" onmousewheel="return false;" onDOMMouseScroll="stopScrollFun">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Visitor_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-visitor_price" data-rule="required" class="form-control" step="0.01" name="row[visitor_price]" type="number" value="0.00" onmousewheel="return false;" onDOMMouseScroll="stopScrollFun">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </div>
    </div>
    <!--<div class="form-group">-->
        <!--<label for="c-images" class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--<div class="input-group">-->
                <!--<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="" />-->
                <!--<div class="input-group-addon no-border no-padding">-->
                    <!--<span><button type="button" id="plupload-imagethumb" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/webp" data-multiple="true" data-preview-id="p-images" data-multipart={"controller":"{$controller}"}><i class="fa fa-upload"></i>{:__('Upload')}</button></span>-->
                    <!--<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true" data-multipart="{$controller}"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
                <!--</div>-->
                <!--<span class="msg-box n-right"></span>-->
            <!--</div>-->
            <!--<ul class="row list-inline plupload-preview" id="p-images"></ul>-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8" style="overflow: scroll;">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="col-xs-12 col-sm-8">
                <div class="checkbox">
                    <div style="display: inline-block;">
                        <label for="row[learn_cate_ids]-1" style="float: left;margin-top: 6px;"><input id="row[learn_cate_ids]-1" name="row[learn_cate_ids][]" type="checkbox" value="1" onclick="change_select(this, 'one')"> 家长</label>
                        <div class="type_one" style="float: left;padding-left: 10px;">
                            {:build_checkboxs('row[type1][]', ['1'=>__('幼儿课程'), '2'=>__('小学课程'), '3'=>__('初中课程'), '4'=>__('高中课程')])}
                        </div>
                    </div>
                    <div style="display: inline-block;">
                        <label for="row[learn_cate_ids]-2" style="float: left;margin-top: 6px;"><input id="row[learn_cate_ids]-2" name="row[learn_cate_ids][]" type="checkbox" value="2" onclick="change_select(this, 'two')"> 学生</label>
                        <div  class="type_two" style="float: left;padding-left: 10px;">
                            {:build_checkboxs('row[type2][]', ['1'=>__('幼儿课程'), '2'=>__('小学课程'), '3'=>__('初中课程'), '4'=>__('高中课程')])}
                        </div>
                    </div>
                    <div style="display: inline-block;">
                        <label for="row[learn_cate_ids]-3" style="float: left;margin-top: 6px;"><input id="row[learn_cate_ids]-3" name="row[learn_cate_ids][]" type="checkbox" value="3" onclick="change_select(this, 'thr')"> 教职</label>
                        <div  class="type_thr" style="float: left;padding-left: 10px;">
                            {:build_checkboxs('row[type3][]', ['1'=>__('幼儿课程'), '2'=>__('小学课程'), '3'=>__('初中课程'), '4'=>__('高中课程')])}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('专题')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_checkboxs('row[learn_special_ids][]', $specialdata)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否单卖')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="is_single-1"><input class="form-input-type" id="is_single-1" name="row[is_single]" type="radio" value="1" checked> 允许</label>
                <label for="is_single-2"><input class="form-input-type"  id="is_single-2" name="row[is_single]" type="radio" value="2"> 不允许</label>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    function stopScrollFun(evt) {
        evt = evt || window.event;
        if(evt.preventDefault) {
            // Firefox
            evt.preventDefault();
            evt.stopPropagation();
        } else {
            // IE
            evt.cancelBubble=true;
            evt.returnValue = false;
        }
        return false;
    }
</script>
